<%@ page import="java.util.List" %>
<%@ page import="com.lanou3g.hw0517.pojo.User" %><%--
  Created by IntelliJ IDEA.
  User: dllo
  Date: 18/5/18
  Time: 上午10:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>结果页面</title>
    <style>
        table {
            border: 1px solid red;
        }

        .a {
            background-color: yellow;
        }

        .b {
            background-color: blue;
        }

        .c {
            background-color: green;
        }

        .d {
            background-color: pink;
        }

        .e {
            background-color: firebrick;
        }

        .f {
            background-color: darksalmon;
        }
    </style>
</head>
<body>
<table>
    <p>欢迎查询</p>
    <%
        List<User> users = (List<User>) request.getAttribute("users");
        for (User user : users) {
            String name = user.getUsername();
            String pwdd = user.getPwd();
            String niname = user.getNickname();
            String hby = user.getHobby();
            String gder = user.getGender();

    %>
    <tr>
        <td class="b">username</td>
        <td class="c">pwd</td>
        <td class="d">nickname</td>
        <td class="e">hobby</td>
        <td class="f">gender</td>
    </tr>
    <tr>

        <td class="b"><%=name%>
        </td>
        <td class="c"><%=pwdd%>
        </td>
        <td class="d"><%=niname%>
        </td>
        <td class="e"><%=hby%>
        </td>
        <td class="f"><%=gder%>
        </td>
    </tr>
    <%
        }
    %>
</table>
</body>
</html>
